Optimal. Leaf size=214 \[ \frac {3 (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a d}+\frac {i (e+f x) \coth (c+d x)}{a d}-\frac {f \text {csch}(c+d x)}{2 a d^2}-\frac {(e+f x) \coth (c+d x) \text {csch}(c+d x)}{2 a d}-\frac {2 i f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}-\frac {i f \log (\sinh (c+d x))}{a d^2}+\frac {3 f \text {PolyLog}\left (2,-e^{c+d x}\right )}{2 a d^2}-\frac {3 f \text {PolyLog}\left (2,e^{c+d x}\right )}{2 a d^2}+\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.27, antiderivative size = 214, normalized size of antiderivative = 1.00, number of steps
used = 19, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {5694, 4270,
4267, 2317, 2438, 4269, 3556, 3399} \begin {gather*} \frac {3 f \text {Li}_2\left (-e^{c+d x}\right )}{2 a d^2}-\frac {3 f \text {Li}_2\left (e^{c+d x}\right )}{2 a d^2}-\frac {f \text {csch}(c+d x)}{2 a d^2}-\frac {i f \log (\sinh (c+d x))}{a d^2}-\frac {2 i f \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )\right )}{a d^2}+\frac {3 (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a d}+\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{a d}+\frac {i (e+f x) \coth (c+d x)}{a d}-\frac {(e+f x) \coth (c+d x) \text {csch}(c+d x)}{2 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 3399
Rule 3556
Rule 4267
Rule 4269
Rule 4270
Rule 5694
Rubi steps
\begin {align*} \int \frac {(e+f x) \text {csch}^3(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\left (i \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\right )+\frac {\int (e+f x) \text {csch}^3(c+d x) \, dx}{a}\\ &=-\frac {f \text {csch}(c+d x)}{2 a d^2}-\frac {(e+f x) \coth (c+d x) \text {csch}(c+d x)}{2 a d}-\frac {i \int (e+f x) \text {csch}^2(c+d x) \, dx}{a}-\frac {\int (e+f x) \text {csch}(c+d x) \, dx}{2 a}-\int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx\\ &=\frac {(e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a d}+\frac {i (e+f x) \coth (c+d x)}{a d}-\frac {f \text {csch}(c+d x)}{2 a d^2}-\frac {(e+f x) \coth (c+d x) \text {csch}(c+d x)}{2 a d}+i \int \frac {e+f x}{a+i a \sinh (c+d x)} \, dx-\frac {\int (e+f x) \text {csch}(c+d x) \, dx}{a}-\frac {(i f) \int \coth (c+d x) \, dx}{a d}+\frac {f \int \log \left (1-e^{c+d x}\right ) \, dx}{2 a d}-\frac {f \int \log \left (1+e^{c+d x}\right ) \, dx}{2 a d}\\ &=\frac {3 (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a d}+\frac {i (e+f x) \coth (c+d x)}{a d}-\frac {f \text {csch}(c+d x)}{2 a d^2}-\frac {(e+f x) \coth (c+d x) \text {csch}(c+d x)}{2 a d}-\frac {i f \log (\sinh (c+d x))}{a d^2}+\frac {i \int (e+f x) \csc ^2\left (\frac {1}{2} \left (i c+\frac {\pi }{2}\right )+\frac {i d x}{2}\right ) \, dx}{2 a}+\frac {f \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{c+d x}\right )}{2 a d^2}-\frac {f \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{c+d x}\right )}{2 a d^2}+\frac {f \int \log \left (1-e^{c+d x}\right ) \, dx}{a d}-\frac {f \int \log \left (1+e^{c+d x}\right ) \, dx}{a d}\\ &=\frac {3 (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a d}+\frac {i (e+f x) \coth (c+d x)}{a d}-\frac {f \text {csch}(c+d x)}{2 a d^2}-\frac {(e+f x) \coth (c+d x) \text {csch}(c+d x)}{2 a d}-\frac {i f \log (\sinh (c+d x))}{a d^2}+\frac {f \text {Li}_2\left (-e^{c+d x}\right )}{2 a d^2}-\frac {f \text {Li}_2\left (e^{c+d x}\right )}{2 a d^2}+\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}+\frac {f \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{c+d x}\right )}{a d^2}-\frac {f \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{c+d x}\right )}{a d^2}-\frac {(i f) \int \coth \left (\frac {c}{2}-\frac {i \pi }{4}+\frac {d x}{2}\right ) \, dx}{a d}\\ &=\frac {3 (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a d}+\frac {i (e+f x) \coth (c+d x)}{a d}-\frac {f \text {csch}(c+d x)}{2 a d^2}-\frac {(e+f x) \coth (c+d x) \text {csch}(c+d x)}{2 a d}-\frac {2 i f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}-\frac {i f \log (\sinh (c+d x))}{a d^2}+\frac {3 f \text {Li}_2\left (-e^{c+d x}\right )}{2 a d^2}-\frac {3 f \text {Li}_2\left (e^{c+d x}\right )}{2 a d^2}+\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(541\) vs. \(2(214)=428\).
time = 1.76, size = 541, normalized size = 2.53 \begin {gather*} \frac {\left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right ) \left (2 i (i f+2 d (e+f x)) \cosh \left (\frac {1}{2} (c+d x)\right ) \left (i+\coth \left (\frac {1}{2} (c+d x)\right )\right )-d (e+f x) \left (i+\coth \left (\frac {1}{2} (c+d x)\right )\right ) \text {csch}\left (\frac {1}{2} (c+d x)\right )-8 f (c+d x) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )+16 f \text {ArcTan}\left (\tanh \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )-12 d e \log \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )+12 c f \log \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )-12 f \left ((c+d x) \left (\log \left (1-e^{-c-d x}\right )-\log \left (1+e^{-c-d x}\right )\right )+\text {PolyLog}\left (2,-e^{-c-d x}\right )-\text {PolyLog}\left (2,e^{-c-d x}\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )+16 i d (e+f x) \sinh \left (\frac {1}{2} (c+d x)\right )+8 f \log (\cosh (c+d x)) \left (-i \cosh \left (\frac {1}{2} (c+d x)\right )+\sinh \left (\frac {1}{2} (c+d x)\right )\right )+8 f \log (\sinh (c+d x)) \left (-i \cosh \left (\frac {1}{2} (c+d x)\right )+\sinh \left (\frac {1}{2} (c+d x)\right )\right )+2 (f+2 i d (e+f x)) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right ) \tanh \left (\frac {1}{2} (c+d x)\right )-i d (e+f x) \text {sech}\left (\frac {1}{2} (c+d x)\right ) \left (-i+\tanh \left (\frac {1}{2} (c+d x)\right )\right )\right )}{8 d^2 (a+i a \sinh (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 422 vs. \(2 (185 ) = 370\).
time = 4.02, size = 423, normalized size = 1.98
method | result | size |
risch | \(-\frac {-3 i d e \,{\mathrm e}^{3 d x +3 c}-5 d f x \,{\mathrm e}^{2 d x +2 c}+3 d f x \,{\mathrm e}^{4 d x +4 c}+i d f x \,{\mathrm e}^{d x +c}-5 d e \,{\mathrm e}^{2 d x +2 c}+3 d e \,{\mathrm e}^{4 d x +4 c}-i {\mathrm e}^{3 d x +3 c} f +4 d x f +f \,{\mathrm e}^{4 d x +4 c}+i d e \,{\mathrm e}^{d x +c}+i {\mathrm e}^{d x +c} f +4 d e -f \,{\mathrm e}^{2 d x +2 c}-3 i d f x \,{\mathrm e}^{3 d x +3 c}}{\left ({\mathrm e}^{2 d x +2 c}-1\right )^{2} d^{2} \left ({\mathrm e}^{d x +c}-i\right ) a}-\frac {i f \ln \left ({\mathrm e}^{d x +c}+1\right )}{a \,d^{2}}-\frac {i f \ln \left ({\mathrm e}^{d x +c}-1\right )}{a \,d^{2}}+\frac {3 e \ln \left ({\mathrm e}^{d x +c}+1\right )}{2 a d}-\frac {3 e \ln \left ({\mathrm e}^{d x +c}-1\right )}{2 a d}+\frac {3 f c \ln \left ({\mathrm e}^{d x +c}-1\right )}{2 a \,d^{2}}-\frac {2 i f \ln \left ({\mathrm e}^{d x +c}-i\right )}{a \,d^{2}}+\frac {4 i f \ln \left ({\mathrm e}^{d x +c}\right )}{a \,d^{2}}+\frac {3 \ln \left ({\mathrm e}^{d x +c}+1\right ) f x}{2 a d}-\frac {3 \ln \left (1-{\mathrm e}^{d x +c}\right ) f x}{2 a d}-\frac {3 \ln \left (1-{\mathrm e}^{d x +c}\right ) c f}{2 a \,d^{2}}+\frac {3 f \polylog \left (2, -{\mathrm e}^{d x +c}\right )}{2 a \,d^{2}}-\frac {3 f \polylog \left (2, {\mathrm e}^{d x +c}\right )}{2 a \,d^{2}}\) | \(423\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 827 vs. \(2 (185) = 370\).
time = 0.39, size = 827, normalized size = 3.86 \begin {gather*} \frac {4 \, c f + 3 \, {\left (f e^{\left (5 \, d x + 5 \, c\right )} - i \, f e^{\left (4 \, d x + 4 \, c\right )} - 2 \, f e^{\left (3 \, d x + 3 \, c\right )} + 2 i \, f e^{\left (2 \, d x + 2 \, c\right )} + f e^{\left (d x + c\right )} - i \, f\right )} {\rm Li}_2\left (-e^{\left (d x + c\right )}\right ) - 3 \, {\left (f e^{\left (5 \, d x + 5 \, c\right )} - i \, f e^{\left (4 \, d x + 4 \, c\right )} - 2 \, f e^{\left (3 \, d x + 3 \, c\right )} + 2 i \, f e^{\left (2 \, d x + 2 \, c\right )} + f e^{\left (d x + c\right )} - i \, f\right )} {\rm Li}_2\left (e^{\left (d x + c\right )}\right ) - 8 \, d e - 4 \, {\left (-2 i \, d f x - i \, c f\right )} e^{\left (5 \, d x + 5 \, c\right )} + 2 \, {\left (d f x + {\left (2 \, c - 1\right )} f - 3 \, d e\right )} e^{\left (4 \, d x + 4 \, c\right )} - 2 \, {\left (5 i \, d f x + {\left (4 i \, c - i\right )} f - 3 i \, d e\right )} e^{\left (3 \, d x + 3 \, c\right )} - 2 \, {\left (3 \, d f x + {\left (4 \, c - 1\right )} f - 5 \, d e\right )} e^{\left (2 \, d x + 2 \, c\right )} - 2 \, {\left (-3 i \, d f x + {\left (-2 i \, c + i\right )} f + i \, d e\right )} e^{\left (d x + c\right )} + {\left (-3 i \, d f x - 3 i \, d e + {\left (3 \, d f x + 3 \, d e - 2 i \, f\right )} e^{\left (5 \, d x + 5 \, c\right )} + {\left (-3 i \, d f x - 3 i \, d e - 2 \, f\right )} e^{\left (4 \, d x + 4 \, c\right )} - 2 \, {\left (3 \, d f x + 3 \, d e - 2 i \, f\right )} e^{\left (3 \, d x + 3 \, c\right )} - 2 \, {\left (-3 i \, d f x - 3 i \, d e - 2 \, f\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left (3 \, d f x + 3 \, d e - 2 i \, f\right )} e^{\left (d x + c\right )} - 2 \, f\right )} \log \left (e^{\left (d x + c\right )} + 1\right ) - 4 \, {\left (i \, f e^{\left (5 \, d x + 5 \, c\right )} + f e^{\left (4 \, d x + 4 \, c\right )} - 2 i \, f e^{\left (3 \, d x + 3 \, c\right )} - 2 \, f e^{\left (2 \, d x + 2 \, c\right )} + i \, f e^{\left (d x + c\right )} + f\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + {\left ({\left (-3 i \, c - 2\right )} f + 3 i \, d e + {\left ({\left (3 \, c - 2 i\right )} f - 3 \, d e\right )} e^{\left (5 \, d x + 5 \, c\right )} + {\left ({\left (-3 i \, c - 2\right )} f + 3 i \, d e\right )} e^{\left (4 \, d x + 4 \, c\right )} - 2 \, {\left ({\left (3 \, c - 2 i\right )} f - 3 \, d e\right )} e^{\left (3 \, d x + 3 \, c\right )} - 2 \, {\left ({\left (-3 i \, c - 2\right )} f + 3 i \, d e\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left ({\left (3 \, c - 2 i\right )} f - 3 \, d e\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} - 1\right ) - 3 \, {\left (-i \, d f x - i \, c f + {\left (d f x + c f\right )} e^{\left (5 \, d x + 5 \, c\right )} + {\left (-i \, d f x - i \, c f\right )} e^{\left (4 \, d x + 4 \, c\right )} - 2 \, {\left (d f x + c f\right )} e^{\left (3 \, d x + 3 \, c\right )} + 2 \, {\left (i \, d f x + i \, c f\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left (d f x + c f\right )} e^{\left (d x + c\right )}\right )} \log \left (-e^{\left (d x + c\right )} + 1\right )}{2 \, {\left (a d^{2} e^{\left (5 \, d x + 5 \, c\right )} - i \, a d^{2} e^{\left (4 \, d x + 4 \, c\right )} - 2 \, a d^{2} e^{\left (3 \, d x + 3 \, c\right )} + 2 i \, a d^{2} e^{\left (2 \, d x + 2 \, c\right )} + a d^{2} e^{\left (d x + c\right )} - i \, a d^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \left (\int \frac {e \operatorname {csch}^{3}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {f x \operatorname {csch}^{3}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {e+f\,x}{{\mathrm {sinh}\left (c+d\,x\right )}^3\,\left (a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________